Quicksort 15 - 122 : Principles of Imperative Computation ( Spring 2016 )

نویسنده

  • Frank Pfenning
چکیده

In this lecture we consider two related algorithms for sorting that achieve a much better running time than the selection sort from an earlier lecture: mergesort and quicksort. We develop quicksort and its invariants in detail. As usual, contracts and loop invariants will bridge the gap between the abstract idea of the algorithm and its implementation. We will revisit many of the computational thinking, algorithm, and programming concepts from the previous lectures. We highlight the following important ones:

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quicksort 15 - 122 : Principles of Imperative Computation ( Summer 1 2015 )

In this lecture we consider two related algorithms for sorting that achieve a much better running time than the selection sort from last lecture: mergesort and quicksort. We developed quicksort and its invariants in detail. As usual, contracts and loop invariants will bridge the gap between the abstract idea of the algorithm and its implementation. We will revisit many of the computational thin...

متن کامل

Union - Find 15 - 122 : Principles of Imperative Computation ( Spring 2016 )

Kruskal’s algorithm for minimum weight spanning trees starts with a collection of single-node trees and adds edges until it has constructed a spanning tree. At each step, it must decide if adding the edge under consideration should create a cycle. If so, the edge would not be added to the spanning tree; if not, it will. In this lecture we will consider an efficient data structure for checking i...

متن کامل

Principles of Imperative Computation ( Fall 2017 )

In this lecture we consider two related algorithms for sorting that achieve a much better running time than the selection sort from an earlier lecture: mergesort and quicksort. We develop quicksort and its invariants in detail. As usual, contracts and loop invariants will bridge the gap between the abstract idea of the algorithm and its implementation. We will revisit many of the computational ...

متن کامل

Lecture Notes on Dynamic Programming 15-122: Principles of Imperative Computation

In this lecture we introduce dynamic programming, which is a high-level computational thinking concept rather than a concrete algorithm. Perhaps a more descriptive title for the lecture would be sharing, because dynamic programming is about sharing computation. We have already seen earlier that sharing of space is also crucial: binary decision diagrams in which subtrees are shared are (in pract...

متن کامل

Lecture Notes on Union-Find 15-122: Principles of Imperative Computation

Kruskal’s algorithm for minimum weight spanning trees starts with a collection of single-node trees and adds edges until it has constructed a spanning tree. At each step, it must decide if adding the edge under consideration would create a cycle. If so, the edge would not be added to the spanning tree; if not, it will. In this lecture we will consider an efficient data structure for checking if...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2016